package com.study.service.impl;

import com.study.bean.entity.DormitoryAdmin;
import com.study.dao.impl.AdminDaoImpl;
import com.study.service.AdminService;

public class AdminServiceImpl implements AdminService {
    private AdminDaoImpl dao = new AdminDaoImpl();


    @Override
    public DormitoryAdmin login(String username, String password) {

        DormitoryAdmin query = dao.login(username, password);
        return query;
    }

    @Override
    public int updatePwd(DormitoryAdmin admin, String newPass) {
        return dao.updatePwd(admin, newPass);
    }

    @Override
    public DormitoryAdmin updateAvatar(Integer adminId, String fileName) {
        return dao.updateAvatar(adminId, fileName);

    }
}
